[/
  Copyright 2020 Ilia Shirobokov.
  Copyright 2020 Alisa Cherniaeva.

  Distributed under the Boost Software License, Version 1.0.
  (See accompanying file LICENSE_1_0.txt or copy at
  http://www.boost.org/LICENSE_1_0.txt).
]
[section:barrett_params Barrett params]

[pre
[*Table of Contents]
 [link boost_multiprecision.tut.modular.modular_adaptor.modular_params.barrett_params.api barrett_params API]
     [link boost_multiprecision.tut.modular.modular_adaptor.modular_params.barrett_params.const_oper Constructors and Operators]
     [link boost_multiprecision.tut.modular.modular_adaptor.modular_params.barrett_params.getter Getters]
     [link boost_multiprecision.tut.modular.modular_adaptor.modular_params.barrett_params.members Class member functions]
        [link reduce `eval_barrett_reduce(Backend& result)`]
]

``
    namespace boost {
    namespace multiprecision {
    namespace backends {
    template <typename Backend>
    class barrett_params;
    }}
``
This class performs the modular reductions using the Barrett reduction [@https://en.wikipedia.org/wiki/Barrett_reduction algorithm].

The class `barrett_params` is inherited from the [link boost_multiprecision.tut.modular.modular_adaptor.modular_params.base_params `base_params`] class.

The pre-computed values required for the algorithm are calculated automatically.

[h2:api API barrett_params]
[h4:const_oper Constructors and Operators]
[table `barrett_params` constructors
    [ [ Signature ] [ Comments ] ]
    [ [ `barrett_params()` ] [ ] ]
    [ [ `barrett_params(const Number& p)` ] [ ] ]
]

[table `barrett_params` operators
    [ [ Signature ] [ Comments ] ]
    [ [ `barrett_params& operator=(const V& v)` ] [ ] ]
]

[h4:getter Getters]
`inline const number_type& mu() const`

Returns the pre-computed constant for the Barrett reduction.

[h4:members Class member functions] 

[#reduce] [role blue `inline void eval_barret_reduce(Backend& result) const`]

Performs Barrett's modular reduction. 

[endsect][/section:barrett_params barrett_params]